/**
 * @author Rudy Kaplan Depena (The University of Texas at Austin)
 */
package com.utaustin.mirankerlab.ultrawrap.compiler.components;

/** RelationalExpr is used as a constraint for the Filter class */
public class RelationalExpr implements FilterConstraint 
{
	
	//instance variables
	Component operand1;
	Component operator;
	Component operand2;
	
	/**
	 * Default Constructor
	 */
	public RelationalExpr()
	{
		operand1 = null;
		operator = null;
		operand2 = null;
	}
	
	/**
	 * Get Operand1
	 * @return
	 */
	public Component getOperand1() 
	{
		return operand1;
	}

	/**
	 * Set Operand1
	 * @param operand1
	 */
	public void setOperand1(Component operand1) 
	{
		this.operand1 = operand1;
	}

	/**
	 * Get Operator
	 * @return operator
	 */
	public Component getOperator() 
	{
		return operator;
	}

	/**
	 * Set Operator
	 * @param operator
	 */
	public void setOperator(Component operator) 
	{
		this.operator = operator;
	}

	/**
	 * Get Operand2
	 * @return operand2
	 */
	public Component getOperand2() 
	{
		return operand2;
	}

	/**
	 * Set Operand2
	 * @param operand2
	 */
	public void setOperand2(Component operand2) 
	{
		this.operand2 = operand2;
	}
	
	/**
	 * Returns true if operand1, operator, operand2 are all filled with an object
	 * as opposed to null
	 * @return true or false
	 */
	public boolean isComplete()
	{
		return operand1 != null && operator != null && operand2 != null;
	}
	
}